
<div class="left">
    <h2>Loại Hàng</h2>
        <?php
        $con = mysql_connect("localhost", "root", "");
        if (!$con) {
            die('Could not connect: ' . mysql_error());
        }
        mysql_select_db("banhang", $con);
        $result = mysql_query("SELECT * FROM loaihang`");
        if (mysql_num_rows($result) > 0) {
            while ($row = mysql_fetch_array($result)) {
                $row['ID'];
                echo "<ul>";
                echo "<li>"."<a href="."#".">" . $row['TenLoaiHang'] ."</a>". "</li>";
                echo "</ul>";
            }
        }
        else
            echo'khong co du lieu';
        mysql_close($con);
        ?>
    <h2>Hàng phổ biến</h2>
    <ul>
        <li><a href="#">hang1</a></li> 
        <li><a href="#">hang2</a></li> 
    </ul>
</div>